<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     * 1、获取了当前ID 增加了选项
     * @return void
     */
    public function up()
    {
        Schema::create('shop_manage_records', function (Blueprint $table) {
            $table->id();
            $table->integer('shop_manage_id')->default(0)->comment('商店id');
            $table->string('key')->default('')->comment('键值');
            $table->string('value')->default('')->comment('键名');
            $table->string('mark')->default('')->comment('备注');
            $table->integer('model_id')->default(0)->comment('模块分类id');
            $table->text('unread')->default('')->comment('未读人');
            $table->timestamps();
        });
        \DB::statement("ALTER TABLE `sub_account_data_records` comment '店铺管理更新记录'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_manage_records');
    }
};
